Self-contained electronic computer including means for immediately executing or storing alphanumeric statements entered into the computer

ABSTRACT

An electronic calculator includes keyboard control means for enabling the user to either immediately execute a line of one or more alphanumeric statements entered into the calculator or store that entered line of one or more alphanumeric statements in the calculator memory.

CROSS REFERENCE TO RELATED APPLICATIONS

This is a division of pending application Ser. No. 232,087, filed onFeb. 6, 1981, now issued as U.S. Pat. No. 4,456,964 which is in turn adivision of application Ser. No. 051,581, filed on June 25, 1979, nowissued as U.S. Pat. No. 4,281,390, which is in turn a division ofapplication Ser. No. 802,323, filed on June 1, 1977, now issued as U.S.Pat. No. 4,178,633, which is in turn a division of application Ser. No.510,921, filed on Sept. 30, 1974, now issued as U.S. Pat. No. 4,028,538,which is in turn a division of application Ser. No. 212,581, filed onDec. 27, 1971, now issued as U.S. Pat. No. 3,839,630. The subject matterof U.S. Pat. No. 3,839,630 is incorporated herein by reference.

BACKGROUND OF THE INVENTION

This invention relates generally to calculators and improvements thereinand more particularly to programmable calculators that may be controlledboth manually from the keyboard input unit and automatically by a storedprogram loaded into the calculator from the keyboard input unit or anexternal record member.

Computational problems may be solved manually, with the aid of acalculator (a dedicated computational keyboard-driven machine that maybe either programmable or nonprogrammable), or a general purposecomputer. Manual solution of computational problems is often very slow,so slow in many cases as to be an impractical, expensive, andineffective use of the human resource, particularly when there are otheralternatives for solution of the computational problems.

Nonprogrammable calculators may be employed to solve many relativelysimple computational problems more efficiently than they could be solvedby manual methods. However, the keyboard operations or language employedby these calculators is typically trival in structure, thereby requiringmany keyboard operations to solve more general arithmetic problems.Programmable calculators may be employed to solve many additionalcomputational problems at rates hundreds of times faster than manualmethods. However, the keyboard language employed by these calculators isalso typically relatively simple in structure, thereby again requiringmany keyboard operations to solve more general arithmetic problems.

Another basic problem with nearly all of the keyboard languages employedby conventional programmable and nonprogrammable calculators is thatthey allow the characteristics of the hardware of the calculator to showthrough to the user. Thus, the user must generally work with datamovement at the hardware level, for example, by making sure that data isin certain storage registers before specifying the operations to beperformed with that date and by performing other such "housekeeping"functions.

SUMMARY OF THE INVENTION

The principal object of this invention is to provide an improvedprogrammable calculator that has more capability and flexibility thanconventional programmable calculators, that is smaller, less expensiveand more efficient in calculating elementary mathematical functions thanconventional computer systems, and that is easier to utilize thanconventional programmable calculators or computer systems.

Another object of this invention is to provide a programmable calculatoremploying a directly useable high-level keyboard language thatcompletely eliminates most of the operator "housekeeping" requirementstypically associated with the languages of conventional programmablecalculators and computers.

Another object of this invention is to provide a programmable calculatorin which the user may enter a line of one or more alphameric statementsinto the calculator from a keyboard, may visually observe an alphamericdisplay of part or all of the line both while it is being entered andafter it has been entered to check for errors therein, and upondetermining that the entered line is error free may selectively cause itto be immediately executed by the calculator and/or stored as a programor a portion of a program within the calculator.

Other and incidental objects of this invention will become apparent froma reading of this specification and an inspection of the accompanyingdrawings.

These objects are accomplished according to the illustrated preferredembodiment of this invention by employing a keyboard input unit, amagnetic card reading and recording unit, a solid state output displayunit, an output printer unit, an input-output control unit, a memoryunit, and a central processing unit to provide an adaptable programmablecalculator having manual operating, automatic operating, programentering, magnetic card reading, magnetic card recording, and alphamericprinting modes. The keyboard input unit includes a group of data keysfor entering numeric data into the calculator, a group of control keysfor controlling the various modes and operations of the calculator andthe format of the output display, and a group of definable keys forcontrolling additional functions that may be added by the user. All ofthe data keys and nearly all of the control keys may also be employedfor programming the calculator, many of the control keys being providedsolely for this purpose.

The magnetic card reading and recording unit includes a reading andrecording head, a drive mechanism for driving a magnetic card from aninput receptacle in the front panel of the calculator housing past thereading and recording head to an output receptable in the front panel,and reading and recording drive circuits coupled to the reading andrecording head for bidirectionally transferring information between themagnetic card and the calculator as determined by the control keys ofthe keyboard input unit. It also includes a pair of detectors and anassociated control circuit for disabling the recording drive circuitwhenever a notch is detected in the leading edge of the magnetic card toprevent information recorded on the magnetic card from beinginadvertently destroyed. Such a notch may be provided in any magneticcard the user desires to protect by simply pushing out a perforatedportion thereof.

The output printer unit includes a stationary thermal printing head witha row of resistive heating elements, a drive circuit for selectivelyenergizing each heating element, and a stepping mechanism for driving astrip of thermally sensitive recording paper past the stationary thermalprinting head in seven steps for each line of alphameric information tobe printed out. Every alphabetic and numeric character and many othersymbols may be printed out individually or in messages as determined bythe control keys of the keyboard input unit or by a program storedwithin the calculator.

The input-output control unit includes a sixteen-bit universal shiftregister serving as an input-output register into which information maybe transferred serially from the central processing unit or in parallelfrom the keyboard input and magnetic card reading and recording unitsand from which information may be transferred serially to the centralprocessing unit or in parallel to the solid state output display,magnetic card reading and recording, and output printer units. It alsoincludes control logic responsive to the central processing unit forcontrolling the transfer of information between these units. Theinput-output control unit may also be employed to perform the samefunctions between the central processing unit and peripheral unitsincluding, for example, a digitizer, a marked card reader, an X-Yplotter, a magnetic tape unit, a disc, and a typewriter. A plurality ofperipheral units may be connected at the same time to the input-outputcontrol unit by simply plugging interface modules associated with theselected peripheral units into receptables provided therefore in a rearpanel of the calculator housing.

The memory unit includes a modular random-access read-write memoryhaving a dedicated system area and a separate user area for storingprogram steps and/or data. The user portion of the read-write memory maybe expanded without increasing the overall dimensions of the calculatorby the addition of a program storage module. Additional read-writememory made available to the user is automatically accommodated by thecalculator, and the user is automatically informed when the storagecapacity of the read-write memory has been exceeded.

The memory unit also includes a modular read-only memory in whichroutines and subroutines of basic instructions for performing thevarious functions of the calculator are stored. These routines andsubroutines of the read-only memory may be expanded and adapted by theuser to perform additional functions oriented toward the specific needsof the user. This is accomplished by simply plugging additionalread-only memory modules into receptacles provided therefor in the toppanel of the calculator housing. Added read-only memory modules areautomatically accommodated by the calculator and may be associated withthe definable keys of the keyboard input unit or employed to expand theoperations associated with other keys. An overlay is employed with eachadded read-only memory module associated with the definable keys of thekeyboard input unit to identify the additional functions that may thenbe performed by the calculator.

Plug-in read-only memory modules include, for example, a trigonometricmodule, a peripheral control module, and a definable functions module.The trigonometric module enables the calculator to perform trigonometricfunctions, logarithmic functions, and many other mathematical functions.The definable functions module enables the user to store subprograms ofhis own choosing in the program storage section of the read-writememory, associate them with some of the definable keys of the keyboardinput unit, and protect them from subsequently being inadvertentlyaltered or destroyed. These subprograms may have their own linenumbering sequence and may be any of three types: an immediate executetype wherein the subprogram may be run upon depressing a DEFINE key; asubroutine utilizing parameters; a function having parameters that maybe employed as any other keyboard function.

The memory unit further includes a pair of recirculating sixteen-bitserial shift registers. One of these registers serves as a memoryaddress register for serially receiving information from anarithmetic-logic unit included in the central processing unit, forparallel addressing any memory location designated by the receivedinformation, and for serially transferring the received information backto the arithmetic-logic unit. The other of these registers serves as amemory access register for serially receiving information from thearithmetic-logic unit, for writing information in parallel into anyaddressed memory location, for reading information in parallel from anyaddressed memory location, and for serially transferring information tothe arithmetic logic unit. It also serves as a four-bit parallel shiftregister for transferring four bits of binary-coded-decimal informationin parallel to the arithmetic-logic unit.

The central processing unit includes four recirculating sixteen-bitserial shift registers, a four-bit serial shift register, the arithmethclogic unit, a programmable clock, and a microprocessor. Two of thesesixteen-bit serial shift registers serve as accumulator registers forserially receiving information from and serially transferringinformation to the arithmetic logic unit. The accumulator registeremployed is designated by a control flip-flop. One of the accumulatorregisters also serves as a four-bit parallel shift register forreceiving four bits of binary-coded-decimal information in parallel fromand transferring four bits of such information in parallel to thearithmetic logic unit. The two remaining sixteen-bit serial shiftregisters serve as a program counter register and a qualifier register,respectively. They are also employed for serially receiving informationfrom and serially transferring information to the arithmetic-logic unit.The four-bit serial shift register serves as an extend register forserially receiving information from either the memory access register orthe arithemtic-logic unit and for serially transferring information tothe arithmetic-logic unit.

The arithmetic-logic unit is employed for performing one-bit serialbinary arithmetic, four-bit parallel binary-coded-decimal arithmetic,and logic operations. It may also be controlled by the microprocessor toperform bidirectional direct and indirect arithmetic between any of aplurality of the working registers and any of the storage registers ofthe data storage section of the read-write memory.

The programmable clock is employed to supply a variable number of shiftclock pulses to the arithmetic logic unit and to the serial shiftregisters of the input-output, memory, and central processing units. Itis also employed to supply clock control signals to the input-outputcontrol logic and to the microprocessor.

The microprocessor includes a read-only memory in which a plurality ofmicroinstructions and codes are stored. These microinstructions andcodes are employed to perform the basic instructions of the calculator.They include a plurality of coded and non-coded microinstructions fortransferring control to the input-output control logic, for controllingthe addressing and accessing of the memory unit, and for controlling theoperation of the two accumulator registers, the program counterregister, the extend register and the arithmetic logic unit. They alsoinclude a plurality of clock codes for controlling the operation of theprogrammable clock, a plurality of qualifier selection codes forselecting qualifiers and serving as primary address codes for addressingthe read-only memory of the microprocessor, and a plurality of secondaryaddress codes for addressing the read-only memory of the microprocessor.In response to a control signal from a power supply provided for thecalculator, control signals for the programmable clock, and qualifiercontrol signals from the central processing and input-output controlunits, the microprocessor issues the microinstructions and codes storedin the read-only memory of the microprocessor as required to processeither binary or binary-coded-decimal information entered into or storedin the calculator.

In the keyboard mode, the calculator is controlled by keycodessequentially entered into the calculator from the keyboard input unit bythe user. The solid state output display unit displays either themnemonic representation of the keys as they are depressed or a numericrepresentation of output data or alphameric user instructions or programresults. The output printer unit may be controlled by the user toselectively print out a numeric representation of any numeric dataentered into the calculator from the keyboard input unit, a numericrepresentation of any result calculated by the calculator, or a programlisting on a line-by-line basis if the mnemonic representation of thekeys entered. The output printer unit may also be controlled by the userto print out labels for inputs to and outputs from the calculator andany other alphameric information that may be desired.

When the calculator is in the keyboard mode, it may also be operated ina trace alphameric printing mode. The output printer unit then printsout a mnemonic representation of each program line as it is entered bythe user.

In the program running mode, the calculator is controlled byautomatically obtaining compiled keycodes stored as steps of a programin the user storage section of the read-write memory. During automaticoperation of the calculator, data may be obtained from the memory unitas designated by the program or may be entered from the keyboard inputunit by the user while the operation of the calculator is stopped fordata either by the program or by the user.

When the calculator is in the program running mode, the user may alsoemploy a TRACE key to check the execution of the program line by line inorder to determine whether the program, as entered into the calculator,does in fact carry out the desired sequence of operations.

In the program entering mode, keycodes are sequentially entered by theuser into the calculator from the keyboard input unit and are compiledinto Polish notation and stored as steps of a program in the userstorage section of the read-write memory.

In the magnetic card reading mode, the magnetic card reading andrecording unit may be employed by the user to separately load eitherdata or programs into the calculator from one or more external magneticcards.

In the magnetic card recording mode, the magnetic card reading andrecording unit may be employed by the user to separately record eitherdata or programs stored in the user section of the read-write memoryonto one or more external magnetic cards. Programs may be coded by theuser as being secure when they are recorded onto one or more externalmagnetic cards. The calculator detects such programs when they arereloaded into the calculator and prevents the user from re-recordingthem or obtaining any listing or other indication of the individualprogram steps.

DESCRIPTION OF THE DRAWINGS

The following figures have been numbered in correspondence with the samefigures of U.S. Pat. No. 3,839,630, cited above as being incorporatedherein by reference.

FIG. 1 is a front perspective view of an adaptable programmablecalculator according to the preferred embodiment of this invention.

FIGS. 3A-B are a simplified block diagram of the adaptable programmablecalculator of FIGS. 1 and 2.

FIG. 7 is a plan view of the keyboard input unit employed in theadaptable programmable calculator of FIG. 1.

DESCRIPTION OF THE PREFERRED EMBODIMENT GENERAL DESCRIPTION

Referring to FIG. 1 there is shown an adaptable programmable calculator10 including both a keyboard input unit 12 for entering information intoand controlling the operation of the calculator and a magnetic cardreading and recording unit 14 for recording information stored withinthe calculator onto one or more external magnetic cards 16 and forsubsequently loading the information recorded on these and other similarmagnetic cards back into the calculator. The calculator also includes asolid state output display unit 18 for displaying alphameric informationstored within the calculator. It may also include an output printer unit20 for printing out alphameric information on a strip of thermallysensitive recording paper 22. All of these input and output units aremounted within a single calculator housing 24 adjacent to a curved frontpanel 26 thereof.

Referring to the simplified block diagram shown in FIGS. 3A-B, it may beseen that the calculator also includes an input-output control unit 44(hereinafter referred to as the I/O control unit) for controlling thetransfer of information to and from the input and output units, a memoryunit 46 for storing and manipulating information entered into thecalculator and for storing routines and subroutines of basicinstructions performed by the calculator, and a central processing unit48 (hereinafter referred to as the CPU) for controlling the execution ofthe routines and subroutines of basic instructions stored in the memoryunit as required to process information entered into or stored withinthe calculator. The calculator also includes a bus system comprising anS-bus 50, a T-bus 52, and an R-bus 54 for transferring information fromthe memory and I/O control units to the CPU, from the CPU to the memoryand I/O control units, and between different portions of the CPU. Itfurther comprises a power supply for supplying DC power to thecalculator and peripheral units employed therewith and for issuing acontrol signal POP when power is supplied to the calculator.

The I/O control unit 44 includes an input-output register 56(hereinafter referred to as the I/O register), associated I/O gatingcontrol circuitry 53, and input-output control logic 60 (hereinafterreferred to as the I/O control). I/O register 56 comprises a universalsixteen-bit shift register into which information may be transferredeither bit-serially from CPU 48 via T-bus 52 or in parallel fromkeyboard input unit 12, magnetic card reading and recording unit 14, andperipheral input units 28 such as the marked card reader via twelveinput party lines 62. Information may also be transferred from I/Oregister 56 either bit-serially to CPU 48 via S-bus 50 or in parallel tomagnetic card reading and recording unit 14, solid state output displayunit 18, output printer unit 20, and peripheral output units 28 such asthe X-Y plotter or the typewriter via sixteen output party lines 64.

I/O gating control circuitry 58 includes control circuits forcontrolling the transfer of information into and out of I/O register 56in response to selected I/O qualifier control signals from CPU 48 andselected I/O control instructions from I/O control 60. It also includesan interrupt control circuit 63, a peripheral control circuit 66, amagnetic card control circuit 67, a printer control circuit 68, and adisplay control circuit 69 for variously controlling the input andoutput units and issuing control signals QPG and EBT to I/O control 60via two output lines 71 and 72. These last mentioned control circuitsvariously perform their control functions in response to control signalPOP from the power supply, I/O qualifier control signals from CPU 48,I/O control instructions from I/O control 60, and control signals fromkeyboard input unit 12. Interrupt control circuit 65 initiates thetransfer of information into I/O register 56 from keyboard input unit 12or interrupting peripheral input units 28 such as the marked card readerand issues a qualifier control signal QNR to CPU 48 via output lines 73.Peripheral control circuit 66 enables interface modules 30 plugged intothe calculator to respond to information from I/O register 56, controlassociated peripheral units 28, transfer information to and/or receiveinformation from associated peripheral units 28, and in some casesinitiate the transfer of information to I/O register 56 from theinterface modules themselves. Magnetic card control circuit 67 enablesmagnetic card reading and recording unit 14 to respond to information inI/O register 56 and either read information into I/O register 56 from amagnetic card 16 or record information onto a magnetic card 16 from I/Oregister 56. Printer control circuit 68 and display control circuit 69enable output display unit 18, and output printer unit 20, respectively,to respond to information from I/O register 56.

When a basic I/O instruction obtained from memory unit 46 is to beexecuted, CPU 48 transfers control to I/O control 60 by issuing a pairof I/O microinstructions PTR and XTR thereto. In response to these I/Omicroinstructions from CPU 48, control signal POP from the power supply,control signals QPG and EBT from I/O gating control circuitry 58, andI/O qualifier and clock control signals from CPU 48, I/O control 60selectively issues one or more I/O control instructions to gatingcontrol circuitry 58 as required to execute the basic I/O instructiondesignated by CPU 48 and issues control signals, TPX, XTR, QRD and SCBto CPU 48 via output lines 74-77. The I/O qualifier control signalsissued to I/O control 60 and gating control circuitry 58 by CPU 48 arederived from the basic I/O instruction to be executed. Those qualifiercontrol signals issued to I/O control 60 designate the specific I/Ocontrol instructions to be issued by I/O control 60, while those issuedto gating control circuitry 53 designate selected control circuits to beemployed in executing the basic I/O instruction.

Memory unit 46 includes a modular random-access read-write memory 78(hereinafter referred to as the RWM), a modular read-only memory 80(hereinafter referred to as the ROM), a memory address register 82(hereinafter referred to as the M-register), a memory access register 84(hereinafter referred to as the T-register), and control circuitry 85for these memories and registers. RWM 78 and ROM 80 comprise MOS-typesemiconductor memories.

Routines and subroutines of basic instructions for performing the basicfunctions of the calculator and constants employed by these routines andsubroutines are stored in these portions of ROM 80. An additional 3,072sixteen-bit words of ROM may also be added on pages 4, 5, and 6 in stepsof 512 and 1,024 words. This is accomplished by simply inserting plug-inROM modules 92 into receptacles 94 provided therefor in top panel 90 ofthe calculator housing as illustrated in FIG. 1 by thepartially-inserted plug-in ROM module on the left. As each plug-in ROMmodule 92 is inserted into one of these receptacles a spring-loaded door95 at the entrance of the receptacle swings down allowing passage of theplug-in ROM module. Once the plug-in ROM module is fully inserted asillustrated by the plug-in ROM module on the right, a printed circuitterminal board 96 contained within the plug-in ROM module plugs into amating edge connector mounted inside the calculator. A handle 98pivotally mounted at the top end of each plug-in ROM module 92facilitates removal of the plug-in ROM module once it has been fullyinserted into one of the receptacles 94.

Routines and subroutines of basic instructions (and any neededconstants) for enabling the calculator to perform many additionalfunctions are stored in each plug-in ROM module 92. The user himself maytherefore quickly and simply adapt the calculator to perform manyadditional functions oriented toward his specific needs by simplyplugging ROM modules of his own choosing into the calculator. Addedplug-in ROM modules are automatically accommodated by the calculator bymomentarily interupting power or by depressing an ERASE MEMORY key, andthey are associated with definable section 91 of keyboard input unit 12or employed to expand the functions performed by this and other sectionsof the keyboard input unit.

Referring again to FIGS. 3A-B, M-register 82 of the memory unitcomprises a recirculating sixteen-bit serial shift register into whichinformation may be transferred bit-serially from CPU 48 via T-bus 52 andout of which information may be transferred bit-serially to CPU 48 viaS-bus 50. Information shifted into M-register 82 may be employed toaddress any word in RWM 78 or ROM 90 via fifteen output lines 106.

T-register 84 of the memory unit comprises a recirculating sixteen-bitserial shift register into which information may be transferred eitherbit-serially from CPU 48 via T-bus 52 or in parallel from any addressedword in RWM 78 and ROM 80 via sixteen parallel input lines 103.Information may be transferred from T-register 84 either bit-serially toCPU 48 via S-bus 50 or in parallel to any addressed word in RWM 78 viasixteen parallel output lines 110. The four least significant bits ofinformation contained in T-register 84 may comprise binary-coded-decimalinformation and may be transferred from the T-register in parallel toCPU 48 via three parallel output lines 112 taken with S- bus 50.

The control circuitry 85 of the memory unit controls these transfers ofinformation into and out of M-register 82 and T-register 84, controlsthe addressing and accessing of RWM 78 and ROM 80, and refreshes RWM 78.It performs these functions in response to memory microinstructions,memory clock pulses, and shift clock pulses from CPU 48.

CPU 48 includes a register unit 114, an arithmetic-logic unit 116(hereinafter referred to as the ALU), a programmable clock 118, and amicroprocessor 120. Register unit 114 comprises four recirculatingsixteen-bit shift registers 122, 124, 126, and 128 and one four-bitshift register 130. Shift registers 122 and 124 serve as sixteen-bitserial accumulator registers (hereinafter referred to as the A-registerand the B-register, respectively) into which information may betransferred bit-serially from ALU 116 via T-bus 52 and out of whichinformation may be transferred bit-serially to ALU 116 via R-bus 54. Thefour least significant bit positions of A-register 122 also serve as afour-bit parallel accumulator register into which four bits ofbinary-coded-decimal information may be transferred in parallel from ALU116 via four parallel input lines 132 and out of which four bits ofbinary-coded information may also be transferred in parallel to ALU 116via three parallel output lines 134 taken with R- bus 54.

Shift register 126 serves as a sixteen-bit system program counter(hereinafter referred to as the P-register) into which information maybe transferred bit-serially from ALU 116 via T-bus 52 and out of whichinformation may be transferred bit-serially to ALU 116 via R- bus 54.Information contained in the least significant bit position ofP-register 126 may also be transferred as a qualifier control signal QPOto microprocessor 120 via output line 135.

Shift register 128 serves as a sixteen-bit qualifier register(hereinafter referred to as the Q-register) into which information maybe transferred bit-serially from ALU 116 via T-bus 52 and out of whichinformation may be transferred bit-serially to ALU 116 via R- bus 54.Information contained in the five least significant bit positions ofQ-register 128 is transferred to I/O gating control circuitry 58 as fiveone-bit I/O qualifier control signals Q00-Q04 via five parallel outputlines 136, and information contained in the six next least significantbit positions of the Q-register is transferred to I/O control 60 as sixone-bit I/O qualifier control signals Q05-Q10 via six parallel outputlines 138. Similarly, information contained in the seven leastsignificant, the ninth and eleventh least significant, and the mostsignificant bit positions of Q-register 128 and information derived fromthe thirteenth, fourteenth, and fifteenth bit positions of theQ-register may be transferred to microprocessor 120 as eleven one-bitmicroprocessor qualifier control signals Q00-Q06, Q07, Q10, Q15, and QMRvia eleven output lines 140. Information contained in the twelfththrough the fifteenth least significant bit positions of Q-register 128may be transferred to microprocessor 120 as a four-bit primary addresscode via four parallel output lines 142.

Shift register 130 serves as a four-bit serial extend register(hereinafter referred to as the E-register) into which information maybe transferred bit-serially either from ALU 116 via T-bus 52 or from theleast significant bit position of T-register 84 via input line 144.Information may also be tranferred out of E-register 130 to ALU 116 viaR- bus 54.

Register unit 114 also includes control circuitry 146 for controllingthe transfer of parallel binary-coded-decimal information into and outof A-register 122 and the transfer of serial binary information into andout of A-register 122, B-register 124, P-register 126, Q-register 128,and B-register 130. This is accomplished in response to registermicroinstructions from microprocessor 120, control signals TTX and XTRfrom I/O control 60, and shift clock control pulses from programmableclock 118. Control circuitry 146 includes a flip-flop 148 (hereinafterreferred to as the A/B flip-flop) for enabling the transfer ofinformation into and out of either the A-register 122 or the B-register124 as determined by the state of the A/B flip-flop. The state of A/Bflip-flop 148 is initially determined by information Q11 transferred tothe A/B flip-flop from the twelfth least significant bit position ofQ-register 128 but may be subsequently complemented one or more time bymicroinstruction CAB from microprocessor 120.

ALU 116 may perform either one-bit serial binary arithmetic on datareceived from T-register 84 or M-register 82 via S-bus 50 and/or fromany register of register unit 114 via R-bus 54 or four-bit parallelbinary-coded-decimal arithmetic on data erceived from T-register 84 viaoutput lines 112 taken with S-bus 50 and/or from A-register 122 viaoutput lines 134 taken with R-bus 54. It may also perform logicoperations on data received from memory unit 46 and/or register unit 114via any of these lines. The arithmetic and logic operations performedare designated by ALU microinstructions from microprocessor 120 and arecarried out in response to these microinstructions, shift clock controlpulses from programmable clock 116, and control signal SCB from I/Ocontrol 60. Information is also transferred from ALU 116 to A-register122 via output lines 132 or to I/O register 56, M-register 82,T-register 84, or any register of register unit 114 via T-bus 52 inresponse to microinstructions and control signals applied to theseregisters. If a carry results while ALU 116 is performing either one-bitserial binary arithmetic or four-bit parallel binary-coded-decimalarithmetic, the ALU issues a corresponding qualifier control signal QBCand QDC to microprocessor 120 via one of two output lines 152 and 154.

Programmable clock 118 includes a crystal-controlled system clock 156, aclock decoder and generator 158, and a control gate 160. System clock156 issues regularly recurring clock pulses to clock decoder andgenerator 158 via output line 162. In response to these regularlyrecurring clock pulses from system clock 156 and to four-bit clock codesfrom microprocessor 120, clock decoder and generator 158 issues trainsof a shift clock pulses to ALU 116, M-register 82, T-register 82, andall of the registers of register unit 114 via output line 164. Thesetrains of n shift clock pulses are employed for shifting a correspondingnumber of bits of serial information into or out of any of theseregisters or for shifting a carry bit in the ALU. The number n of pulsesin each of these trains may vary from one to sixteen as determined bythe number of bits of serial information required during each operationto be performed. In response to a control signal CCO from microprocessor120, control gate 160 prevents any shift clock pulses from being appliedto the ALU or any of these registers. Upon completion of each train of nshift clock pulses, clock decoder and generator 158 issues a ROM clockpulse to microprocessor 120 via output line 166 and an I/O clock pulseto I/O control 60 via output line 168. In response to the regularlyrecurring clock signal from system clock 56, clock decoder and generator158 also issues correspondingly regularly recurring memory clock pulsesto memory unit 46 via output line 170.

Microprocessor 120 selectively issues two I/O microinstructions to I/Ocontrol 60 via two output lines 172, six memory microinstructions tomemory unit 46 via six output lines 174, thirteen registermicroinstructions to register unit 114 via thirteen output lines 176,and five ALU microinstructions to ALU 116 via five output lines 178. Italso issues a four-bit clock code associated with each of thesemicroinstructions to clock decoder 158 via four output lines 130. Thesemicroinstructions and associated clock codes are issued as determined bythe control signal POP from the power supply, the eleven microprocessorqualifier control signals from Q-register 128, the four-bit primaryaddress codes from Q-register 128, and the five microprocessor qualifiercontrol signals from I/O control 60, interrupt control 65, ALU 116, andP-register 126.

KEY OPERATIONS

All operations performed by the calculator may be controlled orinitiated by the keyboard input unit and/or by keycodes entered into thecalculator from the keyboard input unit, the magnetic card reading andrecording unit, or peripheral input units such as the marked card readerand stored as program steps in the program storage section of the RWM.An operational description of the keyboard input unit is therefore nowgiven with specific reference to FIG. 1, except as otherwise indicated.

TURN-ON PROCEDURE

When the OFF/ON switch located on the front of the calculator is set tothe ON position, the following display appears:

    .0.:END

The calculator is then ready for operation.

INITIALIZING THE CALCULATOR

The ERASE key has the same effect as switching the calculator off andthen on again. It erases all stored data and programs from memory andclears the results of any previous calculation or operation.

THE FUNDAMENTAL USER OPERATION

Communication with the calculator is through the display. In general,there are two basic steps to follow when performing operations:

1. A set of directions is written into the display by actuating theappropriate keys.

2. The calculator is then instructed to follow these directions, and theresult of any numerical operation is automatically displayed. Whenmaking keyboard calculations, this step consists solely of actuating theEXECUTE key.

These two basic steps form the fundamental user operation. With a fewexceptions, all operations such as making calculations, loading orrunning programs, giving directions to the printer, etc., consist ofsome variation of the fundamental user operation.

DIAGNOSTIC NOTES

In addition to displaying numbers, directions, and the results ofoperations, the calculator also displays diagnostic notes to inform theuser of operational errors or of special situations. The basic notes arenumbered from 01 to 16 (higher numbered notes are associated with thevarious plug-in ROM's). The note number indicates the type of error orsituation. For example, NOTE 01 indicates that the calculator was givena direction which it could not understand; NOTE 16 indicates that theprinter paper supply has been exhausted. A list of the basic notes and abrief description of their meanings is given in the appendix at the endof Key Operations.

When a note condition occurs in a program execution is halted. Thedisplay then indicates the note as well as the number of the programline in which the note condition occurred; e.g.,

    NOTE .0.2 IN 4

Indicates that a note 02 condition occurred during line 4.

KEYING DIRECTIONS AND NUMBERS

Directions are written into the display by actuating the appropriatekeys. Suppose, for example, that the user desires to add 2 to 4 andprint out the result. The keys PRINT 2+4 are actuated. The calculatordoes not, however, follow these directions until it is instructed to doso by actuating EXECUTE. It then prints (and displays) the result, 6.Numbers are keyed into the display, as on any standard office-machine,by actuating the number keys (0 through 9) and the decimal point key inthe required order. If a number is negative the minus sign should bekeyed first before the number is keyed. Use of commas (such as in32,341.6) is not allowed. As is the case with a direction, even thoughthe keyed number is displayed, it will not be executed by the calculatoruntil the EXECUTE key is actuated. It is not normally desirable toexecute just a single number. The number would usually be includedwithin some set of directions, and then the directions would beexecuted.

USE OF CLEAR

The CLEAR key clears the display, but leaves the memory unaltered. Itoperates immediately and does not have to be followed by EXECUTE. Anend-of-line symbol ( ) appears in the display when CLEAR is actuated,which indicates thta the calculator is idle. It is not necessary toclear the display before keying the next direction as long as theprevious direction has ben executed. In this case of CLEAR is optional.If no subsequent execution has taken place since the last direction waskeyed, then CLEAR must be used. These keys will be printed, andsubsequent tracing will cease.

MAKING ARITHMETIC CALCULATIONS

For arithmetic, the fundamental user operation consists of writing anarithmetic expression into the display and then actuating the EXECUTEkey, to instruct the calculator to evaluate that expression. Anarithmetic expression is written into the display by pressing keys inthe same order as they would be written on paper, one key per characteror symbol. The arithmetic expression may then be executed by simplypressing the EXECUTE key. This is illustrated by the keying sequencesand displayed answers given below.

    ______________________________________                                        Keying Sequence   Displayed Answers                                           ______________________________________                                        3 + 6 EXECUTE     9..0..0.                                                    9 · 3 - 6 EXECUTE                                                                      3.3.0.                                                      -7 EXECUTE        -7..0..0.                                                   6 * (-7) EXECUTE  -42..0..0.                                                  8 · 2 5 * 4 EXECUTE                                                                    33..0..0.                                                   6 * 3 / (11 - 2) EXECUTE                                                                        2..0..0.                                                    √ 3 EXECUTE                                                                              1.73                                                        √ 4 + 5 EXECUTE                                                                          7..0..0.                                                    √ (4 + 5) EXECUTE                                                                        3..0..0.                                                    ______________________________________                                    

As in the above examples, quantities in parentheses are treated as onequantity. Thus √(4+5) is equivalent to √9, whereas, √4+5 adds 5 to thesquare root of 4. The expression 4(3+2) is the equivalent of theexpression 4*(3+2). Use of the multiplication operator is implied and istherefore optional in such cases. Parentheses can be nested (i.e.,parentheses inside parentheses, etc.) but they must always be balanced,that is, there must be the same number of left-handed parentheses asthere are right-handed.

THE ARITHMETIC HIERARCHY

When an arithmetic expression contains more than one operator, as doseveral of the preceding examples, there is a prescribed order ofexecution. An expression must be properly written or the answer will bewrong. The order of execution, known as the hierarchy is shown below:

1. Mathematical functions such as square root;

2. Implied multiplication;

3. Multiplication and division; and

4. Addition and subtraction.

Where an expression contains two or more operators at the same level inthe hierarchy, they will be executed in order from left to right. Theuse of parentheses enables the order of execution to be changed. Thus,in the expression √(4+5) the addition operator is executed before thesquare root operator even though the addition operator occupies a lowerlevel in the hierarchy.

EXCEEDING THE LENGTH OF THE DISPLAY

The length of an expression is not limited to the length of the display.As each exess symbol is keyed, the display shifts left to make room. Themaximum allowable length for an expression varies between 35 and 69keystrokes, depending upon the nature of the expression. If too manykeys are pressed the display shows NOTE 09 (see the section ondiagnostic notes below). Depending upon the nature of the expression thenote may appear either before or after the EXECUTE key is pressed. Ineither case, the operator must press CLEAR and write a shorterexpression.

MAKING CORRECTIONS

The BACK and FORWARD keys enable a displayed expression to be altered orcorrected without re-keying the entire sequence. If a wrong key ispressed when writing an expression, it can be corrected immediately bypressing the BACK key followed by the correct key, as illustrated below:

    ______________________________________                                        Keying Sequence  Display                                                      ______________________________________                                        2 + BACK * 4     2 * 4                                                        ______________________________________                                    

A displayed expression can be blanked, key by key in reverse order, bypressing BACK once for each displayed key. The blanked keys can then bereturned to the display one at a time by pressing FORWARD. If anexpression contains a wrong key, press BACK until that key is blanked,press the correct key and then press FORWARD to return each subsequentkey (or, if extra keystrokes are required, key in the remainder of theexpression). For example, if the number of 123456789 is keyedincorrectly into the display as 123444789, the error may be corrected asindicated by the following steps:

    ______________________________________                                        Keying Sequence          Display                                              ______________________________________                                        BACK BACK BACK BACK BACK 1234                                                 5 6 FORWARD FORWARD FORWARD                                                                            123456789                                            ______________________________________                                    

If the incorrect expression has been executed but no key has since beenpressed, the expression can be returned to the display (by pressingBACK), corrected as before, and then again executed.

Any line of a stored program may be recalled into the display and thencompletely blanked by repeatedly actuating the BACK key. One additionalactuation of the BACk key will bring the entire next preceding line ofthe stored program into the display. It is then possible to backstepthrough that line and bring its predecessor into the display, etc.Analogously, the FORWARD key may be repeatedly actuated to bring thoselines succeeding the current line into the display.

To remove a portion of a line the BACK key is repeatedly actuated untilthe right most character, symbol or mnemonic of the portion to bedeleted becomes the right most item in the display. The DELETE key isthen actuated once for each character, symbol or mnemonic to be removed.Then, if the right most item of the line is not visible in the display,the FORWARD key is repeatedly actuated. The user may then continuewriting the line, execute it, or store it, as appropriate. For example,assume it is desired to delete the underlined portion from the followingline:

    FXD 2; X→Y;PRT (A+B)/A;GTO 4

This is accomplished by repeatedly actuating the BACK key until thedisplay appears as follows:

    ;X→Y;PRT (A+B)/A

Next, the DELETE key is actuated thirteen times. At first the displayshifts to the right to bring the first part of the line into view, whichin this case is FXD 2. However, FXD will not appear until there is roomin the display for all four characters plus the space between D and 2.After this first part of the line comes into view, the line appears toshorten by losing an item from the right-hand side of the display eachtime the DELETE key is actuated, while the rest of the line remainsstationary. After the segment has been deleted, the FORWARD key isrepeatedly actuated until the end of the now modified line comes intoview as follows:

    FXD 2;GTO 4

The user may now continue writing this line, execute it, or store it, ashe desires.

To add a segment to the interior of a line the BACK key is repeatedlyactuated until the right most item visible in the display is thecharacter, symbol or mnemonic immediately preceding the segment soughtto be added. The INSERT key is then actuated and followed by the keyswhich describe the desired segment. The FORWARD key is next repeatedlyactuated until the end of the line is in view. As the keys followingINSERT but preceding FORWARD are actuated their mnemonics are insertedinto the lines with no loss of any other items in the line. Theright-hand portion of the line is shifted to the right to make rooms forthe addition items being inserted. This action continues until one ofthe keys, BACK, FORWARD, DELETE, CLEAR, EXECUTE or STORE is actuated.Generally the insertion of a portion of a line is terminated with theFORWARD key to return to the end of the line. For example, assume it isdesired to insert the portion

    2.0.→B

into the line

    1.0.→A;3.0.→C

To accomplish the insertion, the BACk key is repeatedly actuated untilthe semicolon becomes the right most item in the display. The INSERT keyis then actuated and followed by the key sequence 2.0.→B. Next theFORWARD key is actuated until the entire line is visible as follows:

    1.0.→A; 2.0.→B;3.0.→C

If an error is made by the user during the entry of a portion of a linebeing inserted into an existing line, the erroneous items may be removedby actuating the DELETE key. The user may then continue writing thedesired line portion after actuating the INSERT key.

In addition to modifying individual lines of a program as discussedabove, it is also possible to insert entire lines into or delete entirelines from, the interior of a program stored in memory. If it is desiredto add a line between existing lines 4 and 5, the added line wouldbecome new line 5 while the old line 5 would become the new line 6.Similarly, if it is desired to remove line 3 from a program, the oldline 4 would become the new line 3, the old line 5 would become the newline 4, etc. In both cases the number of available R registers isautomatically adjusted after the change.

To insert a line into a program the program line counter is first set tothe line number which will be associated with the new line. This may beaccomplished, for example, by actuating the GO TO key followed by thenumber keys representing the line number followed by the EXECUTE key.The new line is then written into the display and followed by sequentialactuation of the INSERT and STORE keys. The new line becomes stored, andall succeeding lines of the program together with their line numbers areshifted to provide room.

To delete a line from a program the program line counter is first set tothe line number of the line to be deleted. Sequential actuation of theRECALL and DELETE keys will remove the line and shift all succeedinglines and their line numbers to close the gap.

THE DATA MEMORY

The basic calculator contains 179 registers: six storage and workingregiters (A, B, C, X, Y and Z) and 173 program and data storageregisters (R0 through R172). An additional 256 R-registers (R173 throughR428) may be added giving a total of 435 registers.

The A, B, C, X, Y and Z registers are selected by pressing the A, B, C,X, Y and Z keys, respectively, while the R registers are selected bypressing the R() key followed by the appropriate number keys 0 through172 or 428. The argument of the R() key may be a computed quantity. Forexample, sequentially pressing the R(), (, 7, 0, /, 2, and ) keysdenotes the R35 register. The argument of the R() may also be avariable. Then, if register A contains the number 15, sequentiallypressing the R() and A keys denotes R15 register. Similarly, if the R5register contains the number 10 and the C register contains the number25, sequentially pressing the R(), (, R(), 5, +, C, and) denotes the R35register.

The register denoted by the keying sequence R(), R(), R() . . . R()followed by one or more number keys is determined by the numberdesignated by the number keys and by the numbers contained in thevarious registers. For example, the keying sequence R(), R(), 2 denotesthe R8 register if R2 contains the number 8.

When the number following the R() key does not have a strictly integralvalue, the fractional part of the value is ignored. Thus, the keyingsequence R(), 3, 5, 6, ., 6 denotes the R35 register. A plus signimmediately following the R() key is dropped when the line containing itis stored. Thus, the keying sequence R(), +, /, % is stored as R() 35. Aminus sign immediately following the R() key is not permitted, andcauses a syntax error (NOTE .0.1) If the R() key is followed by aquantity whose value is either negative, or greater than the number ofavailable R registers, an error during execution results (the indicationwill be either NOTE .0.5 or NOTE .0.6, depending upon the exactcircumstances).

Some of the plug-in read-only memory modules require part of the memoryfor their own use. When one of these modules is installed, itautomatically takes the required registers, starting at the highestnumbered register and working downwards. Those registers are thentemporarily not available for program or data storage, until the moduleis removed.

When programs are stored they start in the highest-numbered availableR-register and sequentially fill the memory downwards. Programs cannotbe stored in the A, B, C, X, Y and Z registers. It is, therefore, mostconvenient to store data first in the A, B, C, X, Y and Z registers andthen in the lower numbered R-registers. If the memory contains noprogram (i.e. at turn-on, or if ERASE has been pressed), then allregisters (except those required by a plug-in read-only memory modulewill be available for data storage. If the memory does contain aprogram, then the higher-numbered registers will not be available fordata diagnostic NOTE .0.6 will be displayed if the operator attempts tostore data in a register which is not available.

The number of available R-registers can be determined at any time bypressing CLEAR LIST STOP. The printer will start to list the program(the STOP saves having to wait for the whole program to be listed). Atthe bottom of the list will be a number preceded by the letter Rindicating the number of R-registers available. (The lowest-numberedregister is R0; subtract 1 from the number printed to obtain the name ofthe highest-numbered register available for data storage).

STORING DATA

One register can contain one data-number. It is not necessary to clear aregister before storing a number in it because the number being storedautomatically substitutes for the existing stored number. The entirememory is, however, cleared at turn-on if ERASE is pressed. Storing datarequires use of the →key. For example, pressing

    1 2 . 6→A EXECUTE

stores 12.6 in the A register. Similarly, pressing

    6→X EXECUTE

stores 6 in the X register, and pressing

    1 9→R() 1 2 EXECUTE

stores 19 in register R12. A stored number may be viewed by using eitherthe DISPLAY or the PRINT keys. For example, pressing

    DISPLAY A EXECUTE

displays the number currently stored in A (the number remains stored inA). Similarly, pressing

    PRINT R() 1 2 EXECUTE

prints the contents of R12 (the number remains stored in R12).

IMPLIED Z

In general, if a stored number is to be kept for any length of time itshould not be stored into the Z register because the result of anyarithmetic expression is automatically stored in Z if no other storagelocation is specified, thus

    1 4 . 2 EXECUTE

is equivalent to

    1 4 . 2→Z EXECUTE

Both expressions result in a display 14.2 which is also stored in the Zregister. Similarly,

    3 * 4+1 6 / 3 EXECUTE

is equivalent to

    3 * 4+1 6 / 3→Z EXECUTE

A statement involving numerical activity usually contains aninstruction, such as PRT, DSP, or →. If there is no such instruction,the form <quantity>→Z; or <mathematical expression>→Z, is usuallyautomatically assumed when the line is executed or stored.

The automatic addition of Z onto the end of a statement is called the`implied store in Z`.

For instance, if the operator presses A EXECUTE to view the contents ofA, the line A→Z is what is actually executed. The contents of A are seenbecause that is the numerical quantity associated with the lastassignment instruction executed in the line. Meanwhile, the contents ofZ have been replaced by those of A, and are lost. The recommendedprocedure for viewing the contents of a register is to use the PRINT orDISPLAY statements, as they do not disturb the contents of anyregisters.

Because of the implied store in Z, the Z register is not recommended forstoring data during calculations performed from the keyboard, except incertain situations. For instance, suppose the operator wished to add aseries of numbers: n₁, n₂, n₃, . . . To do this, the register is firstset to zero by executing the line 0→z. Then, the numbers are added inthe following manner:

    n.sub.1 +Z

    n.sub.2 +Z

    n.sub.3 +Z

Because of the implied store into Z, this is what is actually happening:

    ______________________________________                                        n.sub.1 + Z→Z                                                                       n.sub.1 + O→Z                                             n.sub.2 + Z→Z                                                                       n.sub.2 + n.sub.1 →Z                                      n.sub.3 + Z→Z                                                                       n.sub.3 + (n.sub.1 + n.sub.2)→Z                           .            .                                                                .            .                                                                .            .                                                                ______________________________________                                    

REGISTER ARITHMETIC

Arithmetic expressions may be written using register names instead ofactual numbers. When the expression is executed, the values currentlystored in those registers will be automatically substituted for theregister names in order to evaluate the expression. For example, assumethe user has made the following storage assignments:

    12.6 in A

    6 in X

    19 in R12

With the above values stored, the keying sequence

    A+R()12-X EXECUTE

would be equivalent to the keying sequence

    12.6+19-6 EXECUTE

Other values stored in these registers would, of course, give adifferent result for the same expression.

Numbers and register-names may be mixed in an expression, as follows:

    3*12.6+4-6 EXECUTE

FIXED- AND FLOATING-POINT NUMBERS

Numbers can be keyed into the display and displayed in either fixedpoint or floating point notation. In fixed-point notation, a numberappears in the display as commonly written, with the decimal pointcorrectly located. Floating-point numbers are written with the decimalpoint immediately following the first digit (discounting leading zeros)and with an exponent. The exponent, which represents a positive ornegative power of ten, indicates the direction, and the number ofplaces, that the decimal point should be moved, to express the number asfixed-point number. In the calculator the exponent may be any integerwithin the range -99 to +99. Examples of fixed point and floating pointnotation follow:

    ______________________________________                                        Fixed          Floating                                                       ______________________________________                                        1234.5         = 1.2345 × 10.sup.3                                      0.0012345      = 1.2345 × 10.sup.-3                                     1.2345         = 1.2345 × 10.sup.0                                      ______________________________________                                    

The FIXED N key selects fixed point display of displayed results. Theletter N indicates that the key must be followed by one of the numberkeys (0 through 9) to select the number of digits to be displayed to theright of the decimal point.

The FLOAT IN key operates in the same way as FIXED N except thatfloating point display is selected, with N designating the requiredpower of ten. (When the calculator is turned on, FLOAT 9 isautomatically assumed.) For example, the number 123.456789 in float 9notation would be displayed as 1.23456789.0.E.0.Z. The letter E in thedisplay indicates that the next two digits constitute the exponent. Ifthe exponent is negative a minus sign follows the E, the illustratedbelow.

    ______________________________________                                        Keying Sequence  Display                                                      ______________________________________                                        0 0 1 2 3 4 EXECUTE                                                                            1.234.0..0..0..0..0..0.E-.0.3                                ______________________________________                                    

No more than ten significant digits can be displayed; therefore if anumber becomes too large to be properly displayed as a fixed pointnumber, it will be automatically displayed as a floating point number.If the number becomes too small, only zeros are displayed but the numbermay still be seen if floating point notation is then selected.

The ENTER EXPONENT key is used to designate the E (exponent) whennumbers are being keyed in floating point form, as illustrated below:

    ______________________________________                                        Keying Sequence     Display                                                   ______________________________________                                        FLOAT N 4 EXECUTE                                                             2 · 5 6 ENTER 2 EXECUTE                                                                  2.56.0..0.E .0.2                                          EXP                                                                           4 · 7 3 ENTER - 2 EXECUTE                                                                4.73.0..0.E-.0.2 -EXP                                     ______________________________________                                    

RANGE OF CALCULATION

The range of the calculator is from ±10⁻⁹⁹ to ±9.999999999×10⁹⁹ ; whenthis range is exceeded during a calculation diagnostic NOTE 10 isdisplayed. Calculations which normally result in zero, such assubtracting a number from a number equal to itself, do not exceed therange.

OPERATING THE PRINTER

The print key is used to print both numerical values and alphamericmessages (the form of a numerical printout is changed by the FIXED N andFLOAT N keys in the same way as the display is changed). This isillustrated by the following examples (in which it is assumed the FIXEDN key 2 key and EXECUTE key have previously been pressed to determinethe form of the printout):

    ______________________________________                                        Printing OperationKeying SequencePrintout                                     ______________________________________                                        Print A NumberPRINT 1 2 3EXECUTE123..0..0.                                    Print result of a calculation                                                 PRINT 6 + 8 / 2EXECUTE10..0..0.                                               Print contents of a storage register                                          PRINT AEXECUTE(CONTENTS OF A)                                                 ______________________________________                                    

To print an alphanumeric message requires the use of the quote key (")to both start and end the message (the quote symbol is not printed) asillustrated by the following example:

    ______________________________________                                        Keying Sequence                                                               PRINT "MESSAGE SPACE NO. 2" EXECUTE                                           Printout                                                                      MESSAGE NO. 2                                                                 ______________________________________                                    

no more than sixteen characters (including spaces) can be printed on oneline of a message, and each line must be enclosed in quotes. Whenfollowing the same PRINT instruction, lines must be separated by commas,as indicated below:

    PRINT "--------", "--------" EXECUTE

This prints two lines. If messages and values are to be mixed, they mustbe separated by a comma as illustrated by the following example in whichit is assumed that the number 456 has been stored in the A register.

    PRINT "A=", A EXECUTE A=456..0..0.

Pressing the SPACE N key followed by one or more number keys designatingany one of the numbers 0 through 15 causes the printer to spacevertically (the number key specified in the number of lines spaced).This is illustrated by the following example:

    ______________________________________                                        Keying Sequence      Printout                                                 ______________________________________                                        PRINT "DAYS" EXECUTE DAYS                                                     SPACE N 2 EXECUTE                                                             PRINT 4 EXECUTE      4.00                                                     ______________________________________                                    

When used in a message, most keys result in the character printed beingthe same as the character on the key. The following keys are theexceptions:

1. SPACE prints one blank character-space

2. GO TO prints @

3. R() prints:

4. STOP prints !

5. ENTER EXP prints ↑

The following keys either cannot be used in a message or they result insome meaningless character being printed:

1. All of the half-keys at the top of the keyboard and the four blankkeys in the left-hand keyblock.

2. The EXECUTE key, RUN PROGRAM key, and STORE key.

3. The JUMP key, END key, IF key, GO TO/SUB key, FLAG N key, RETURN key,and SET/CLEAR FLAG N key.

PROGRAMS

A program enables the calculator to automatically execute the keysnecessary to solve a particular problem. First the program must beloaded into the calculator's memory to teach the calculator which keysequences are required and the order in which they are to be executed.Once loaded, the calculator can remember that program until a new one isloaded over it or until the calculator is switched off. A program neednot be keyed into the calculator more than once because a loaded programcan be recorded on magnetic cards. Recorded programs may then be loadedback into the calculator any time in the future. Once the program hasbeen loaded, it is initialized, and then execution is commenced byactuating RUN PROGRAM key.

A complete program consists of lines of program information, each ofwhich may be separately loaded into the calculator memory from thekeyboard by actuating the STORE key when the line has been completed. Anend-of-line symbol is automatically displayed at the end of each lineafter that line has been stored. A program line counter keeps track ofwhich line of a program is currently being executed or is about to beexecuted or stored next. Before storing a line into the calculatormemory, it may be edited with the aid of the BACK, FORWARD, CLEAR,DELETE and INSERT keys. After all lines of the program have been stored,individual lines may be recalled into the display for editing or otherpurposes. Recall is accomplished by sequentially actuating the CLEAR andGO TO keys followed by the number keys representing the line number ofthe line to be recalled followed, finally, by the RECALL key. Whenrestoring the recalled line or the edited version thereof it is onlynecessary to actuate the STORE key.

MAGNETIC PROGRAM CARDS

A magnetic card 16 such as that shown in FIG. 1 is used to permanentlyor temporarily store programs or data. The card has two sides that maybe used independently to store either data or programs (however, dataand programs cannot be mixed on the same side of the card). Once arecording has been made on a card-side, that card-side can be protectedfrom erasure by tearing out a corresponding protect tab on the card. Therecording on a protected card side cannot be changed.

A program loaded into the memory may be recorded on a magnetic card 16by pressing

    END EXECUTE RECORD EXECUTE

to start the card-reader motor and by then inserting an unprotected cardinto the card reader. The program from the card may be loaded back intothe memory by first sequentially pressing the ERASE key to clear thememory, by then pressing the END, EXECUTE, LOAD and EXECUTE keys, and bythereupon inserting the card into the card reader.

THE PROGRAM LINE

Even though the lines of a program are stored in the same memory asdata, the length of individual lines bears no relationship to the lengthof a register. The calculator simply uses however many registers arenecessary to accommodate a particular line. The length of a line isdetermined by the programmer and depends upon the requirements of hisprogram. However, the length is limited by machine requirements, in thesame way that an individual expression is limited (see Exceeding theLength of the Display). Diagnostic NOTE 09 appears either before orafter STORE is pressed, if the line is too long. When NOTE 09 appearsthe operator should press CLEAR and key in a completely new (shortened)line.

Line numbers are automatically assigned, by the calculator, in strictnumerical sequence, beginning with line 0. The operator must know whatline numbers will be assigned if there are any GO TO statements in hisprogram. The line numbers are not strictly a part of the program becausethey will automatically change if the program is moved to a differentlocation in memory. For example, suppose a program (No. 1) is a ten-lineprogram (lines 0 through 9) and is already stored in the memory. If asecond program (No. 2) is now loaded below program No. 1, then the firstline of program No. 2 will be line 10, whereas, if program No. 2 hadbeen the only program in the memory, then its first line would have beenline 0. (Any GO TO statements must be corrected, by the programmer, toreflect any such line number changes.)

A line can have one or more statements, separated by semicolons. Theactual number of statements on any one line is generally notsignificant, it being more important to have the statements in thecorrect order rather than on a particular line. Position of a statementdoes become significant where a line contains an IF statement or where abranch is to be made. In the former case, those statements which are tobe conditionally executed must be on the same line as the IF statementand must come after the IF. In the latter case, a branch is always madeto the beginning of a line. Therefore, the first statement to beexecuted after a branch must be the first statement of the line to whichthe branch is made. It is recommended that not too many statements beput on one line because a short line is easier to change (once stored)then a long line.

THE DATA ENTRY STATEMENT

Program statements resulting from actuations of the ENTER key are usedto halt the program during execution so that the user can key in data.The simplest statement contains only a register name, which is displayedwhen program execution is halted. The data keyed during the halt isstored, into the register designated, when RUN PROGRAM is subsequentlypressed. For example, ENT A; results in the keyed data being stored inregister A. An enter statement may contain several register names (whichmust be separated by commas). The program will halt for each register inturn. For example, ENT A, R13, X; is the equivalent of the threeseparate statements ENT A; ENT R13; ENT X;. A label (followed by acomma) may precede the register name. In this case the label will bedisplayed, instead of the name, when the halt occurs. For example, ENT"A=?",A; displays A=? and stores the subsequent data entry into registerA.

BRANCHING

Program lines are normally executed in numerical sequence. However, somestatements cause the sequence of execution to be changed. This is knownas branching (instead of the program going to the next sequential line,it branches to some other specified line and continues program executionthere). There are two kinds of branching, conditional and unconditional.Unconditional branching is accomplished with the GO TO, JUMP and GO TOSUB keys while conditional branching is done with the IF key.

There are three types of unconditional branching with GO TO. The firsttype is an absolute GO TO. On absolute GO TO statements take the form GOTO N, where N is an integer that refers to a particular program line.The second type is a relative GO TO. The form of the relative GO TOstatement is GO TO+N or GO TO-N, where N is an integer. This means toskip forward or backward N program lines. The third type is a GO TOlabel. This type of GO TO statement takes the form GO TO "LABEL", whereLABEL is any unique alphameric group of characters and must be enclosedin quotes. The number of characters in the label is virtually unlimited,however, the calculator will only look at the last four characters inthe label. When a GO TO "LABEL" statement is executed the program willbranch to a program line with "LABEL" as the first statement of thatline, where LABEL has the identical last four characters as the originalGO TO "LABEL" statement. If two lines have the same label branchexecution will always go the first label.

In a program, a GO TO statement causes program execution to continuewith the line whose number is specified. When a GO TO statement isentered from the keyboard and followed by the RUN PROGRAM key, the GO TOstatement causes program execution to start at the line whose number isspecified. However, when a GO TO statement is entered from the keyboardand followed by the EXECUTE key, the GO TO statement causes thecalculator to go to the line specified but not to start programexecution. Any subsequent activity then depends upon the next keypressed. A line number is valid only if a currently stored program has aline identified by that number, or if it is the next higher number afterthe number identifying the last stored line. All other numbers arenon-valid and, if used in a GO TO statement, will cause diagnostic NOTE08 to be displayed.

JUMP allows relative branching. But, unlike the GO TO, can have anumeric constant, a register or any legitimate calculator expression asa parameter. JUMP-6 on execution would go back six lines in the program.If the contents of A were 6.23 then JUMP A would jump the integer valueof A lines, or in this case 6 lines in the program. If A were 6.23 and Bwere 2, then JMP (A+B) would be acceptable and would jump eight lines onexecution.

Often it is desirable to execute the same operations at several placesin a program. One could simply repeat a group of program lines asneeded, but this can be time consuming and error prone. More important,unnecessary repetition of program lines wastes memory space. Thecalculator has the capability to store a set of program lines once, andallow a program to execute this set of lines many times. Such a group ofprogram lines is called a subroutine.

Once a subroutine has been written and stored in memory, execution maybranch to the subroutine from a program. This is known as calling asubroutine. The program which calls the subroutine is usually referredto as the mainline program or calling program. When the subroutineexecution is completed a branch is made back to the calling program andmainline execution is resumed where it was interrupted by the subroutinecall. The branch from the subroutine to the mainline program is called areturn. Note that if a subroutine is called in line N; the return ismade to line N+1.

Branching to a subroutine is accomplished by using the GO TO SUB. GO TOSUB works almost exactly like GO TO and may branch to an absolute,relative or "LABEL" address. The difference between GO TO and GO TO SUBis that when a GO TO SUB is used for a branch, the calculator stores theline number for the return branch address. To make the return branchRETURN is stored at the end of the subroutine. The calculator itselfwill provide the address for the return branch.

The IF statement allows the powerful feature of conditional branching inthe calculator enabling the calculator to decide whether or not toexecute the succeeding statement(s) on the same line as that IFstatement. The general form of the IF statement is IF followed by acondition completing the statement. (For Example, IF A-B;). The line inwhich the IF statement appears may be completed with any otherstatements. The operation will be as follows. First the conditionimmediately following the IF will be evaluated to check the truth of thecondition. If the condition is true, the statements following the IFstatement are executed, and if the condition is false, executionimmediately goes to the next line. Thus, in the example given above, A=Bis first computed to determine whether the contents of the A registerequal the contents of the B register. If this condition is true, therest of the line would be executed. If it is false, the rest of the linewould be ignored and execution would be immediately to the next line.

The conditions in IF statements all use one of the following keys totest the relationship of any two values, registers, arithmeticexpressions, or flags;

1. > (greater than)

2. ≦ (less than or equal to)

3. = (equal to)

4. ≠ (not equal to)

If the relationship is the same as that indicated by the key used ananswer of true (one) will be given and if not an answer of false (zero)will be given. For example, if the contents of A and B were 2 then

    A=B→C

would store 1 in C,

    A≠B→C

would store 0 in C, and

    A+B=A→C

would store 0 in C.

Again, there can be used in any expression A+B(A=B)+AB(A≦B)+(A+B+C)(A>B)→C would store 2+2(1)+4(1)+6(0) which is 8 inC.

THE STOP AND END STATEMENTS

The STOP key, used as a statement in a program or pressed while aprogram is running, halts program execution. STOP should be used only toabort a program (in the sense that it is no longer desired to run theprogram, or that it is desired to start execution again at thebeginning).

The END key serves the dual purpose of halting program execution and ofinitializing the calculator for commencing program execution at line 0.

THE FLAGS

The calculator makes sixteen flags available to the user as selected bythe FLAG N key followed by numeric keys to designate one of the flags 0through 15. For example, actuation of the FLAG N 4 selects flag 4. Flagsare used generally as part of an IF statement to enable the user todefine some special condition.

The calculator terminology used to describe flags is quite simple: If aflag is raised, it is set; a set flag is considered to have the value1.If a flag is lowered, it is cleared; a cleared flag is considered tohave the value 0.

Flags are set and cleared by means of the SET/CLEAR FLAG N key. This keyis actuated once to set a flag and twice to clear it. For example, asingle actuation of the SET/CLEAR FLAG N key followed by the 1 and 2number keys sets flag 12. Similarly, a double actuation of the SET/CLEARFLAG N key followed by the 7 key cleared flag 7. Once set, a flagremains set until it is deliberately cleared. However, all flags areautomatically cleared at turn-on, or when ERASE is pressed, or when anEND statement is executed.

As long as no program is being executed, the state of any flag can beexamined actuating the FLAG N key followed by number keys representingthe flag in question followed by the EXECUTE key. The state (value) ofthe flag will then be displayed. Such a test will not change the stateof any flag.

In addition to their normal use, flags 0 and 13 also have a specialpurpose. Flag 0 may be set from the keyboard while a program is acutallyrunning, by pressing the SET/CLEAR FLAG N key. Flag 13 is setautomatically if the program halts for an ENTER statement and the RUNPROGRAM key is then actuated without any data being keyed.

LIST MODE

The LIST key facilitates printing by means of the calculator printingunit a program listing of an internally stored program. The listingincludes the line number of each line together with an alphamericmnemonic representation of the line. An indication of the number ofstorage registers remaining is printed at the end of the listing.

Program listing is accomplished by first setting the program linecounter to the line at which listing is to commence. This may be done byactuating the GO TO Key followed by the number keys representing theline number followee by the EXECUTE key. Next, the LIST key is actuatedto begin the listing operation, which will terminate at the last programline stored.

TRACE MODE

A trace mode of the calculator enables the user to obtain a printedrecord of its operation. The form of this printed record is a functionof the type of operation in progress.

The calculator may be placed in the trace mode by actuating the TRACEkey followed by the EXECUTE key or by program execution of a TRACEcommand. The calculator may be returned to normal mode by actuating theNORMAL key followed by the EXECUTE key or by a program execution of aNORMAL command. The calculator is automatically placed in the normalmode when it is turned on.

While in the trace mode, the calculator prints a representation of eachline execution from the keyboard and the results of those executedstatements which produce a quantity that is considered a result. A fewkeys, such as CLEAR, are not printed.

The following example is illustrative of the printout obtained when thecalculator is operating in the trace mode:

    ______________________________________                                        .0.→A;.0.→B                                                                        .0...0..0.                                                                    .0...0..0.                                                 A+1→A;B+1.0.→B                                                                     1..0..0.                                                                      1.0...0..0.                                                A+1→A;B+1.0.→B                                                                     2..0..0.                                                                      2.0...0..0.                                                PRT "A=",A,"B=",                                                              A=                 2..0..0.                                                   B=                 2..0..0.                                                   ______________________________________                                    

While running a program in the trace mode the calculator prints the linenumber of each line as it is executed, and below that, any quantitiesthat were stored into registers by that line. Running a program in thetrace mode may be very helpful in debugging a program by analyzing thenumbers stored during the execution of the program. A program may,without alteration, be run in the trace mode simply by sequentiallyactuating the TRACE and EXECUTE keys before execution of the program isbegun. In addition, the calculator may be placed in the trace modeduring execution of any program which does not contain a NORMALstatement by simply actuating the TRACE key. It is not necessary to haltexecution of the program first.

We claim:
 1. A self-contained electronic computer comprising:keyboardinput means, including a plurality of keys, for entering lines of one ormore alphanumeric statements each into the computer; buffer storagemeans, coupled to said keyboard input means, for storing each line ofone or more alphanumeric statements as it is entered into the computerfrom said keyboard input means; first memory means, for storing aprogram of lines of one or more alphanumeric statements each enteredinto the computer; second memory means for storing a plurality ofroutines and subroutines to be performed by the computer in executingand storing lines of one or more alphanumeric statements each;processing means, coupled to said keyboard input means, buffer storagemeans, and first and second memory means, for selectively processingeither a line of one or more alphanumeric statements entered into thecomputer and stored in said buffer storage means or a program of linesof one or more alphanumeric statements stored in said first memory meansto perform selected functions; and output means, coupled to saidprocessing means, for providing an output indication of the results ofselected functions performed by the computer; said keyboard input meansincluding control means for conditioning the processing means toselectively execute a line of one or more alphanumeric statementsentered into the computer and stored in said buffer storage means or tostore that entered line of one or more alphanumeric statements as partof a program in said first memory means.
 2. An electronic calculatorcomprising:keyboard input means, including a plurality of keys, forentering lines of one or more alphanumeric statements each into thecalculator; buffer storage means, coupled to the keyboard input means,for storing each line of one or more alphanumeric statements as it isentered into the calculator; first memory means, coupled to the keyboardinput means and the buffer storage means, for storing a plurality oflines of one or more alphanumeric statements each; said keyboard inputmeans including control means for selectively initiating eitherexecution of a line of one or more alphanumeric statements entered intothe buffer storage means or storage, in the first memory means, of aline of one or more alphanumeric statements entered into the bufferstorage means; second memory means for storing a plurality of routinesand subroutines to be performed by the calculator in executing andstoring lines of one or more alphanumeric statements each; processingmeans coupled to the keyboard input means, buffer storage means, firstmemory means, and second memory means and responsive to actuation of thecontrol means following entry of a line of one or more alphanumericstatements into the buffer storage means for selectively performing oneor more of the routines and subroutines stored in said second memorymeans to execute that line of one or more alphanumeric statements; saidprocessing means also being responsive to actuation of the control meansfollowing entry of a line of one or more alphanumeric statements intothe buffer storage means for selectively performing one or more of theroutine and subroutines stored in said second memory means to store thatline of one or more alphanumeric statements in the first memory means;and output means for providing an output indication of the results ofany line of one or more alphanumeric statements executed by thecalculator.
 3. An electronic calculator as in claim 2 wherein saidcontrol means comprises a control key of said keyboard input means.